package cn.zhouchao.feigen;

import cn.zhouchao.domain.User;
import cn.zhouchao.fallback.UserServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "user-service", path = "user", contextId = "userService", fallbackFactory = UserServiceFallbackFactory.class)
public interface UserService {
    @GetMapping(value = "/{id}")
    User getUser(@PathVariable Long id);
}
